import { defHttp } from '/@/utils/http/axios';
// import { useMessage } from '/@/hooks/web/useMessage';

// const { createConfirm } = useMessage();
enum Api {
  noCheckInlist = '/wyf/wyfOrders/list', // 房源经营统计
  tenantCheckInList = '/wyf/wyfTenants1/list', // 住客入住统计
  propertyCheckInList = '/wyf/wyfTjFyRz/current', // 房源入住统计
  examineList = '/wyf/wyfTjFySh/current', // 房源审核统计-最新统计数据
  tenantSourceList = '/wyf/wyfTjZkLy/total/list', // 住客来源统计 /
  wyfTjZkFx = '/wyf/wyfTjZkFx/total/list', // 住客入住统计
  detail = '/wyf/wyfOrders/queryById',
  dispose = '/wyf/wyfOrders/xxx',
}

/**
 * 列表接口
 * @param params
 */
export const noCheckInlist = async (params) => {
  return defHttp.get({ url: Api.noCheckInlist, params });
};
/**
 * 详情接口
 * @param params
 */
export const detail = (params) => defHttp.get({ url: Api.detail, params });

/**
 * 处置接口
 */
export const disposeUpdate = (params) => {
  return defHttp.post({ url: Api.dispose, params });
};

export const examineList = async (params) => {
  const res = await defHttp.get({ url: Api.examineList, params });
  return res.list;
};
export const propertyCheckInList = async (params) => {
  const res = await defHttp.get({ url: Api.propertyCheckInList, params });
  return res.list;
};
export const tenantSourceList = async (params) => {
  const res = await defHttp.get({ url: Api.tenantSourceList, params });
  return res.list;
};

export const tenantCheckInList = async (params) => {
  const res = await defHttp.get({ url: Api.wyfTjZkFx, params });
  return res.list;
};
